package routers

import (
	"pfl/controllers"
	"pfl/controllers/admin"

	"github.com/astaxie/beego"
)

func init() {
	beego.InsertFilter("/admin/*", beego.BeforeExec, admin.FilterUser)
	Ueditor()
	Admin()

	beego.Router("/", &controllers.IndexController{})

	beego.Router("/prev_login", &controllers.PrevloginController{})
	beego.Router("/register", &controllers.RegisterController{})

	//	beego.Router("/list", &controllers.ListController{})
	//	beego.Router("/list/:id", &controllers.ListController{}, "get:List")
	beego.Router("/list/data", &controllers.ListController{}, "Post:GetListData")
	//	beego.Router("/list-1/:id", &controllers.ListController{}, "get:List_1")
	//	beego.Router("/list-2/:id", &controllers.ListController{}, "get:List_2")
	//	beego.Router("/list-2/data", &controllers.ListController{}, "Post:GetList_2Data")
	beego.Router("/blist/:id", &controllers.ListController{}, "get:BList")
	beego.Router("/slist/:id/:bid", &controllers.ListController{}, "get:SList")
	beego.Router("/detail/:id", &controllers.DetailController{})
	beego.Router("/search", &controllers.ListController{}, "Get:SearchList")
	beego.Router("/search/data", &controllers.ListController{}, "Post:SearchData")
}
